
<br/>

<h2>Advertisements</h2>
<br/>
<div align="left">
	<a href="<?php echo site_url('admin/ads'); ?>">Xem tất cả</a> &nbsp; |
	<a href="<?php echo site_url('admin/ads/left'); ?>">Quảng cáo trái</a> &nbsp; |
	<a href="<?php echo site_url('admin/ads/right'); ?>">Quảng cáo phải</a> &nbsp; |
	<a href="<?php echo site_url('admin/ads/home'); ?>">Quảng cáo trang chủ</a> &nbsp; |
	<a href="<?php echo site_url('admin/addNewAd'); ?>">Add new advertisements</a>
</div>
<br/>
<!--
	#id
	#title
	#href
	#image
	#order
	#edit
-->
<table border="0" width="800px">
	<?php
		$id = 1;
		foreach($ads as $ad)
		{
	?>
	<tr align="center">
		<td><?php echo $id; ?></td>
		<td><?php echo $ad['title']; ?></td>
		<td><?php echo $ad['href']; ?></td>
		<td><img src="<?php echo base_url('upload/image/ads/'.$ad['image']);  ?>" width="150px" height="150px"></td>
		<td><?php echo $ad['order']; ?></td>
		<td><a href="<?php echo site_url('admin/editAd/'.$ad['id']); ?>">Edit</a></td>
	</tr>
	<?php
			$id++;
		}
	?>	
</table>